﻿
using Caliburn.Micro;
using KouDai.Phone.Utils;
namespace KouDai.Phone.ViewModels
{
    public class MainPageViewModel : KouDaiScreen
    {
        #region Fields
        readonly INavigationService _navigationService;
        private string _userName;
        #endregion

        public MainPageViewModel()
        {
            if (Execute.InDesignMode)
            {
                LoadDesingTimeData();
            }
        }

        public MainPageViewModel(INavigationService navigationService)
        {
            this._navigationService = navigationService;
        }

        private void LoadDesingTimeData()
        {
            UserName = "sunyanfei";
        }

        public string UserName
        {
            get { return _userName; }
            set { _userName = value; }
        }

        public void GoToDemoPage()
        {
            _navigationService.UriFor<ShellPageViewModel>().Navigate();
        }

        protected override void OnInitialize()
        {
            base.OnInitialize();
        }
    }
}
